<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>model</title>
    <script src="https://unpkg.com/vue"></script>
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.css" rel="stylesheet">

</head>
<body>
<div id="app">
    <input type="text" v-model="firstname" @keyup="getFullname">+
    <input type="text" v-model="lastname" @keyup="getFullname">=
    <input type="text" v-model="fullname">
</div>

</body>
<script>
    var vm = new Vue({
        el: '#app',
        data: {
            msg: '大家好哈哈哈哈，你们好啊。',
            firstname: '',
            lastname: '',
            fullname: ''
        },
        methods: {
            getFullname() {
                this.fullname = this.firstname + '-' + this.lastname;
            }
        }

    })
</script>
</html>